import Api from '@/api/reports/userReport'
import i18n from "@/lang/index";
const contentConfig = {
  pageName: "sys:user",
  table: {
    border: true,
    highlightCurrentRow: false,
  },
  indexAction: (data) => {
    console.log("index", data);
    return new Promise((resolve, reject) => {
      Api.getList(data).then(s => {
        console.log(s);
        resolve(s)
      }).catch(e => {
        console.log(e);
        reject(e)
      })
    });
  },
  deleteAction: function (id) {
 
  },
  exportAction: function (queryParams) {
    // 导出Excel文件
    // return exportUser(queryParams);
  },
  pk: "id",
  toolbar: [
    "refresh",
    // "add",
    // "delete",
    // "export",
    // {
    //   name: "import",
    //   icon: "upload",
    //   text: "导入",
    //   auth: "import",
    // },
  ],
  cols: [
    { label: i18n.global.t("label.138"), align: "center", prop: "date",fixed: "left", minWidth: 180},

    { label: i18n.global.t("label.15"), align: "center", prop: "user_id",fixed: "left", minWidth: 150 },
    { label: i18n.global.t("label.9"), align: "center", prop: "user.username", width: 150 ,fixed: "left"},
    { label: i18n.global.t("label.127"), align: "center", prop: "deposits_count" },
    { label: i18n.global.t("label.123"), align: "center", prop: "total_deposits" },

    { label: i18n.global.t("label.142"), align: "center", prop: "withdrawals_count" },
    { label: i18n.global.t("label.17"), align: "center", prop: "total_withdrawals" },

    { label: i18n.global.t("label.89"), align: "center", prop: "bets_count" }, 
    { label: i18n.global.t("label.90"), align: "center", prop: "total_bets" },
    { label: i18n.global.t("label.136"), align: "center", prop: "wins_count" },
    { label: i18n.global.t("label.135"), align: "center", prop: "total_winnings" },
    
    { label: i18n.global.t("label.132"), align: "center", prop: "bonuses_count" },
    { label: i18n.global.t("label.128"), align: "center", prop: "total_bonuses" },
    { label: i18n.global.t("label.124"), align: "center", prop: "commissions_count" },
    { label: i18n.global.t("label.129"), align: "center", prop: "total_commissions" },

    { label: i18n.global.t("label.125"), align: "center", prop: "credits_count" },
    { label: i18n.global.t("label.130"), align: "center", prop: "total_credits" },
    { label: i18n.global.t("label.126"), align: "center", prop: "debits_count" },
    { label: i18n.global.t("label.131"), align: "center", prop: "total_debits" },

    { label: i18n.global.t("label.134"), align: "center", "type": "time", prop: "created_at", minWidth: 180 },
    { label: i18n.global.t("label.133"), align: "center", "type": "time", prop: "updated_at", minWidth: 180,fixed:"right" },
    
  ],
};

export default contentConfig;
